﻿// --------------------------------------------------------------------------------------------------------------------
// <copyright file="EncDec.cs" company="">
//   
// </copyright>
// --------------------------------------------------------------------------------------------------------------------
namespace AdminTool
{
    using System;
    using System.Windows.Forms;

    using ExecutionTool.Common;

    public partial class EncDec : Form
    {
        #region Constructors and Destructors

        public EncDec()
        {
            this.InitializeComponent();
        }

        #endregion

        #region Methods

        private void buttonDecrypt_Click(object sender, EventArgs e)
        {
            if (!string.IsNullOrWhiteSpace(this.textBoxCiphered.Text))
            {
                this.textBoxClear.Text = Helper.Decrypt(this.textBoxCiphered.Text.Trim());
            }
        }

        private void buttonEncrypt_Click(object sender, EventArgs e)
        {
            if (!string.IsNullOrWhiteSpace(this.textBoxClear.Text))
            {
                this.textBoxCiphered.Text = Helper.Encrypt(this.textBoxClear.Text.Trim());
            }
        }

        #endregion
    }
}
